Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify plugin drop support #1723

Merged
merged 1 commit into from
Jan 14, 2025
Merged

simplify plugin drop support #1723

merged 1 commit into from
Jan 14, 2025

Conversation

scytacki
Copy link
Member

@scytacki scytacki commented Jan 10, 2025

This replaces the use of applyModelChange and just calls broadcastMessage directly on the tile.

The reason for tackling this is that I'm trying to type the INotifications better. Without the drag notification this type is pretty simple and consistent. So by having the drag notifications not use applyModelChange, it is now possible for applyModelChange to take a more restrictive and simple set of arguments.

With that change it is easier for a simple version of applyModelChange to be included in the CODAP "library" I'm trying to create. The basic idea is that this library would support a notification system which it uses internally. The system isn't specific to sending messages to data interactives, but that is the way it will be used when the components of the library are used within the main CODAP app.

A further step could be removing the notifyTileId from the applyModelChange arguments. A tileId will not really have a meaning when the CODAP library is used outside of CODAP, but it is just a string so won't cause problems to leave it in.

This is the first in a series of PRs:

Copy link

cypress bot commented Jan 10, 2025

codap-v3    Run #5864

Run Properties:  status check passed Passed #5864  •  git commit e3579b3c33: Merge pull request #1723 from concord-consortium/188710376-simplify-di-drag
Project codap-v3
Branch Review main
Run status status check passed Passed #5864
Run duration 06m 41s
Commit git commit e3579b3c33: Merge pull request #1723 from concord-consortium/188710376-simplify-di-drag
Committer Scott Cytacki
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 53
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 240
View all changes introduced in this branch ↗︎

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.79%. Comparing base (38dfe8a) to head (f6a5729).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
.../src/components/web-view/web-view-drop-overlay.tsx 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1723      +/-   ##
==========================================
- Coverage   85.85%   85.79%   -0.06%     
==========================================
  Files         618      618              
  Lines       31831    31834       +3     
  Branches     8843     8231     -612     
==========================================
- Hits        27327    27312      -15     
- Misses       4175     4366     +191     
+ Partials      329      156     -173     
Flag Coverage Δ
cypress 74.48% <57.14%> (-0.07%) ⬇️
jest 54.14% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

this replaces the use of applyModelChange and just calls broadcastMessage directly on the tile
@scytacki scytacki force-pushed the 188710376-simplify-di-drag branch from e2eda18 to f6a5729 Compare January 10, 2025 15:47
@scytacki scytacki marked this pull request as ready for review January 10, 2025 19:25
@scytacki scytacki requested a review from tealefristoe January 10, 2025 19:34
@kswenson kswenson added the v3 CODAP v3 label Jan 10, 2025
Copy link
Contributor

@tealefristoe tealefristoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I don't remember exactly why we used applyModelChange for this originally--it might have been to make all notifications consistently go through applyModelChange, or we may have just not given it much thought and went with what we'd already been doing. Either way, it's probably best to run this by Kirk before merging.

I'd also suggest removing notifyTileId from applyModelChange as a part of this work, assuming it's no longer used for anything. Otherwise, it will likely linger in the codebase and become mysterious and confusing sometime in the future.

@scytacki scytacki requested a review from kswenson January 13, 2025 02:07
Copy link
Member

@kswenson kswenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@scytacki scytacki merged commit e3579b3 into main Jan 14, 2025
22 of 24 checks passed
@scytacki scytacki deleted the 188710376-simplify-di-drag branch January 14, 2025 14:59
@scytacki
Copy link
Member Author

I've merged this as is for now. I'll try to remove the notifyTileId infrastructure in a follow on PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants